// 主题色
$theme-primary: #2897FF !default;
$theme-danger: #f35626 !default;
// 背景颜色
$tab-active: $theme-primary;

.page-login {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  // min-width: rem(1000px);
  // min-height: rem(600px);
  min-width: 1000px;
  min-height: 600px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.login-header {
  height: 100px;
  margin: 0 rem(60px);
  padding: rem(26px) 0 rem(25px);
  border-bottom: 1px solid RGBA(255, 255, 255, .4);
  box-shadow: 0px 10px 10px -6px rgba(18, 64, 107, 0.1);
  overflow: hidden;

  .login-logo {
    max-width: rem(415px);
    height: rem(48px);
  }

  .login-header-info {
    float: right;
    padding: rem(9px) 0;
    font-size: rem(16px);
    line-height: rem(30px);
    color: #fff;

    li {
      float: left;

      &:not(:first-child) {
        margin-left: rem(60px);
      }
    }

    .icon {
      margin-right: rem(16px);
    }
  }
}

.login-footer {
  position: absolute;
  bottom: rem(54px);
  width: 100%;
  font-size: rem(12px);
  line-height: rem(24px);
  font-weight: 400;
  color: #fff;
  text-align: center;
}

.login-box {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: rem(242px);
  width: rem(440px);
  margin-top: rem(-280px);
  padding: rem(50px) rem(60px);
  // transform: translateY(-50%);
  border-radius: rem(10px);
  background: #fff;
}


.login-form {
  .login-form-item {
    position: relative;
    margin-top: rem(30px);
  }

  .login-form-btn {
    width: 100%;
    height: 48px;
    font-size: 18px;
    line-height: rem(48px);
  }

  .login-form-remember {
    float: right;
    line-height: rem(30px);
    color: #858585;
  }
  .login-form-error {
    position: absolute;
    margin-top: 2px;
    color: #f24957;
  }
}

.login-tabs {
  font-size: 0;
  height: rem(40px);

  .login-tab-item {
    position: relative;
    display: inline-block;
    margin-right: rem(24px);
    font-size: rem(14px);
    line-height: rem(26px);
    font-weight: bold;
    color: #A6A6A6;
    cursor: pointer;
    transition: color, font-size .2s linear;

    &:hover {
      color: $tab-active;
    }

    &::after {
      content: '';
      position: absolute;
      margin: 0 auto;
      bottom: rem(-16px);
      left: 50%;
      height: rem(4px);
      width: 0;
      border-radius: rem(2px);
      transform: translateX(-50%);
      background: $tab-active;
      transition: width .2s linear;
    }

    &.login-title {
      cursor: default;

      &::after {
        display: none;
      }
    }

    &.active {
      font-size: rem(24px);
      color: $tab-active;

      &::after {
        width: 80%;
      }
    }
  }
}

.login-form-input {
  border: 1px solid #ccc;
  border-radius: rem(4px);
  color: #333;
  transition: border-color, box-shadow .2s linear;

  &.active {
    border-color: lighten($theme-primary, 5%);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px lighten($theme-primary, 5%);
  }

  &.invalid {
    border-color: $theme-danger;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px lighten($theme-danger, 5%);
  }

  .icon {
    float: left;
    width: rem(20px);
    height: rem(20px);
    margin: rem(13px) rem(20px);
  }

  .login-form-input-container {
    display: flex;
    padding: rem(5px) rem(20px) rem(5px) 0;
    overflow: hidden;

    input {
      width: 100%;
      // 解决chrome记住密码后填充时强制增加1px的border
      border: none !important;
      outline: none;
      font-size: rem(14px);
      line-height: rem(36px);
    }
  }

  .login-code {
    margin-left: auto;
    margin-right: -12px;
    line-height: 36px;
  }

  ::-webkit-input-placeholder {
    color: #858585;
  }

  :-moz-placeholder {
    color: #858585;
  }

  ::-moz-placeholder {
    color: #858585;
  }

  :-ms-input-placeholder {
    color: #858585;
  }

  // :-webkit-autofill {
  //   -webkit-text-fill-color: transparent !important;
  //   transition: background-color 5000s ease-in-out 0s;
  // }
}

.login-form-code {
  .code-img {
    float: right;
    margin-left: rem(15px);
    width: rem(130px);
    height: rem(48px);
    background: #ccc;
    cursor: pointer;

    img {
      display: block;
      width: 100%;
      height: 100%;
    }
  }

  .login-form-input {
    overflow: hidden;
  }
}

.login-pub-code {
  padding: rem(6px);
  min-width: inherit;

  img {
    display: block;
    width: rem(150px);
    height: rem(150px);
  }
}